package com.suep.business.service.impl;

import com.suep.business.domain.Meal;
import com.suep.business.mapper.MealMapper;
import com.suep.business.service.IMealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class MealServiceImpl implements IMealService {

    @Autowired
    private MealMapper mealMapper;
    @Override
    public Integer insertMeal(Meal meal) {
        return mealMapper.insert(meal);
    }

    @Override
    public Integer updateMeal(Meal meal) {

        return mealMapper.update(meal);
    }
    @Override
    public List<Meal> selectMealListByStoreIdByCategoryId(Integer storeId, Integer categoryId){
        return mealMapper.selectByStoreIdByCategoryId(storeId,categoryId);
    }

    @Override
    public Integer deleteMeal(Integer mealId) {
        return mealMapper.deleteById(mealId);
    }

    @Override
    public Meal selectMealById(Integer mealId) {
        return selectMealById(mealId);
    }

    @Override
    public List<Meal> selectMealsByStoreId(Integer storeId) {
        return mealMapper.selectByStoreId(storeId);
    }

    @Override
    public List<Meal> selectSalableMeals(Integer storeId, Integer categoryId, Boolean isAvailable) {
        return Collections.emptyList();
    }

    @Override
    public List<Meal> selectMealPage(int page, int size) {
        return Collections.emptyList();
    }
}
